<cfcomponent extends="Controller">
	<cffunction name="init">

	</cffunction>
	
	<cffunction name="contact">
		<cfscript>
			PARAMS.email = Replace(PARAMS.email, ",", "", "All");
			PARAMS.to = (get("environment") IS "design") ? "Chiukk1@Gmail.com" : "roddy@showmesmart.com,kristina@showmesmart.com";

			sendEmail(
				from = "mailadmin@showmesmart.com",
				to = PARAMS.to,
				template = "contact",
				subject = "[ShowMeSmart Contact Form] #PARAMS.name#",
				recipientName = "ShowMeSmart Email Admin",
				startDate = "#DateFormat(Now(), 'mmm dd, yyyy')# @ #TimeFormat(Now(), "h:mm tt")#"
			);

			flashInsert(success="Your Message Was Successfully Sent!");
			redirectTo(controller="main", action="contact");
		</cfscript>
	</cffunction>
</cfcomponent>